Namespaces | Functions | Variables
MultiCast.py File Reference

Namespaces

 MultiCast
 

Functions

def decoding_char (ctypes_char_array)
 
def work_thread (cam=0, pData=0, nDataSize=0)
 

Variables

 currentsystem = platform.system()
 
 input_func = raw_input
 
bool g_bExit = False
 
 SDKVersion = MvCamera.MV_CC_GetSDKVersion()
 
 deviceList = MV_CC_DEVICE_INFO_LIST()
 
 tlayerType = MV_GIGE_DEVICE
 
 ret = MvCamera.MV_CC_EnumDevices(tlayerType, deviceList)
 
 mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents
 
def strModeName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chModelName)
 
def strSerialNumber = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chSerialNumber)
 
tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)
 
tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)
 
tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)
 
tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)
 
 nConnectionNum = input_func("please input the number of the device to connect:")
 
 cam = MvCamera()
 
 stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents
 
 key = input_func()
 
bool monitor = False
 
 nPacketSize = cam.MV_CC_GetOptimalPacketSize()
 
string strIp = "239.0.1.23"
 
string device_ip_list = strIp.split('.')
 
tuple dest_ip = (int(device_ip_list[0]) << 24) | (int(device_ip_list[1]) << 16) | (int(device_ip_list[2]) << 8) | int(device_ip_list[3])
 
 stTransmissionType = MV_TRANSMISSION_TYPE()
 
 enTransmissionType
 
 nDestIp
 
 nDestPort
 
 hThreadHandle = threading.Thread(target=work_thread, args=(cam, None, None))